package com.edu.publisher.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.edu.publisher.bean.TestCourseUcAvgScoreDuration;
import com.edu.publisher.bean.TestPaperUcAvgScoreDuration;
import com.edu.publisher.bean.TestQuestionAnswer;
import com.edu.publisher.bean.TestUcAboutPaperLevel;
import com.edu.publisher.mapper.TestStatsMapper;
import com.edu.publisher.service.TestStatsService;

/**
 * Created on 2022/10/20.
 *
 * @author Topus
 */
@Service
public class TestStatsServiceImpl implements TestStatsService {
    @Autowired
    private TestStatsMapper testStatsMapper;

    @Override
    public List<TestPaperUcAvgScoreDuration> getUcAvgScoreDurationAboutPaper(Integer date, Integer limit) {
        return testStatsMapper.selectUcAvgScoreDurationAboutPaper(date, limit);
    }

    @Override
    public List<TestCourseUcAvgScoreDuration> getUcAvgScoreDurationAboutCourse(Integer date, Integer limit) {
        return testStatsMapper.selectUcAvgScoreDurationAboutCourse(date, limit);
    }

    @Override
    public List<TestUcAboutPaperLevel> getUcAboutPaperLevel(Integer date, Integer limit, String Level) {
        return testStatsMapper.selectUcAboutPaperLevel(date, limit, Level);
    }

    @Override
    public List<TestQuestionAnswer> getAcCacRate(Integer date) {
        return testStatsMapper.selectAcCacRate(date);
    }

    @Override
    public Double getMaxCorrectRate(Integer date) {
        return testStatsMapper.selectMaxCorrectRate(date);
    }

    @Override
    public Long getMaxDoQuestionCount(Integer date) {
        return testStatsMapper.selectMaxDoQuestionCount(date);
    }

    @Override
    public Double getMaxCorrectUserRate(Integer date) {
        return testStatsMapper.selectMaxCorrectUserRate(date);
    }
}
